package com.atguigu.tingshu.album.client;

import com.atguigu.tingshu.album.client.impl.TrackInfoDegradeFeignClient;
import com.atguigu.tingshu.common.result.Result;
import com.atguigu.tingshu.model.album.TrackInfo;
import com.atguigu.tingshu.vo.album.TrackListVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * <p>
 * 产品列表API接口
 * </p>
 *
 * @author qy
 */
@FeignClient(value = "service-album", path = "/api/album/rpc", fallback = TrackInfoDegradeFeignClient.class)
public interface TrackInfoFeignClient {

    @PostMapping("/getTrackInfoListByIds")
    Result<List<TrackListVo>> getTrackInfoListByIds(@RequestBody List<Long> trackIdList);

    @GetMapping("/getTrackInfoById/{trackId}")
    Result<TrackInfo> getTrackInfoById(@PathVariable(value = "trackId") Long trackId);

}